<?php
    /**
     *  This pipeline is called when pdk recherche is being processed
     */
    function ecatalogue_pdk_recherche($flux) {
        $flux['ecatalogue'] = 
                  array('id_table'=>'ecatalogue_products', // Table where to search
                        'original_table'=>'articles', // Writing this we say that original table is 'spip_articles', so IDs that match search condition, are IDs of articles
                        'id_field'=>'id_article', // We write 'id_article', because it is primary key of "spip_ecatalogue_products" table
                        'fields'=>array('sku'), // Here we write fields in which to search
                        'where'=>false); // Here we can additional where condition if needed (e.g. seach only in products with quantity > 0)
        return $flux;
    }
?>